const Sequelize = require('sequelize');
module.exports = function(sequelize, DataTypes) {
  return sequelize.define('act_re_deployment', {
    id: {
      type: DataTypes.STRING(64),
      allowNull: false,
      primaryKey: true,
      field: 'ID_'
    },
    name: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'NAME_'
    },
    category: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'CATEGORY_'
    },
    key: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'KEY_'
    },
    tenantId: {
      type: DataTypes.STRING(255),
      allowNull: true,
      defaultValue: "",
      field: 'TENANT_ID_'
    },
    deployTime: {
      type: DataTypes.DATE(3),
      allowNull: true,
      field: 'DEPLOY_TIME_'
    },
    derivedFrom: {
      type: DataTypes.STRING(64),
      allowNull: true,
      field: 'DERIVED_FROM_'
    },
    derivedFromRoot: {
      type: DataTypes.STRING(64),
      allowNull: true,
      field: 'DERIVED_FROM_ROOT_'
    },
    parentDeploymentId: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'PARENT_DEPLOYMENT_ID_'
    },
    engineVersion: {
      type: DataTypes.STRING(255),
      allowNull: true,
      field: 'ENGINE_VERSION_'
    }
  }, {
    sequelize,
    tableName: 'act_re_deployment',
    timestamps: false,
    indexes: [
      {
        name: "PRIMARY",
        unique: true,
        using: "BTREE",
        fields: [
          { name: "ID_" },
        ]
      },
    ]
  });
};
